<div class="form-group" {guanlians}>
	<label class="col-xs-12 col-sm-3 col-md-2 right-label">{{check_show_lang('{title}')}}</label>
	<div class="col-xs-12 col-sm-9">
		<div class="timebox">
			<ul class="list-unstyled timelist clockpicker">
				<li class="input-group" style="margin:10px 0" ng-repeat="item in {tovalue}.{name}">
					<span class="input-group-addon">{title1}</span>
					<input type="text"  data-index="{{$index}}" ng-model="item.{field1}.start" class="form-control starttime" value="{{item.{field1}.start}}">
					<span class="input-group-addon">-</span>
					<input type="text"  data-index="{{$index}}" ng-model="item.{field1}.end" class="form-control endtime" value="{{item.{field1}.end}}">
					<span ng-if="'{title2}'!='noshow'" class="input-group-addon">{title2}</span>
					<input ng-if="'{title2}'!='noshow'" type="text" ng-model="item.{field2}"  class="form-control number" value="{{item.{field2}}}">
					<span ng-if="'{title2}'!='noshow'" class="input-group-addon">{field2unit}</span>
					<span class="input-group-btn"><button class="btn btn-danger remove" type="button" href="javascript:;" ng-click="{tovalue}.{name}.splice($index,1)">删除</button></span>
				</li>
				<a href="javascript:;" ng-click="newfield={};i={tovalue}.{name}.push(newfield);" class="btn btn-primary">{add_tip}</a>
			</ul>
		</div>
		<div class="help-block">{help}</div>
	</div>
</div>
<script type="text/javascript">
require(['angular.sanitize','clockpicker'], function(angular, $, _){
	$('.starttime').clockpicker({
		autoclose: true,
		afterDone: function() {
			$('.starttime').each(function(){
				var index=$(this).attr('data-index');
				scope.{tovalue}.{name}[index].{field1}.start=$(this).val();
			});
        },
	});
	$('.endtime').clockpicker({
		autoclose: true,
		afterDone: function() {
			$('.endtime').each(function(){
				var index=$(this).attr('data-index');
				scope.{tovalue}.{name}[index].{field1}.end=$(this).val();
			});
        },
	});
});
if(scope.{tovalue}.{name}.length < 1){
	var times = [
			{
			'{field1}':{start:'8:00',end:'9:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'9:00',end:'10:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'10:00',end:'11:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'11:00',end:'12:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'12:00',end:'13:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'13:00',end:'14:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'14:00',end:'15:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'15:00',end:'16:00'},
			'{field2}':10
			},
			{
			'{field1}':{start:'16:00',end:'17:00'},
			'{field2}':10
			}
	]
	scope.{tovalue}.{name} = times;
}
</script>